import { store } from "@/redux";
import { Navigate, useNavigate } from "react-router-dom";

const Loading = () => {
  const navigate = useNavigate();
  const { authRouter } = store.getState().auth;
  return (
    <>
     { authRouter && authRouter.length > 0 ? <Navigate to={authRouter[0]}/> : <div>Loading...</div> }
    </>
  )
}

export default Loading;